/*
 * @Author: ztao
 * @Date: 2022-01-17 14:32:19
 * @LastEditTime: 2022-01-17 15:10:24
 * @Description:
 */
/**
 * Created by PanJiaChen on 16/11/18.
 */

/**
 * @param {string} path
 * @returns {Boolean}
 */
export function isExternal(path) {
  return /^(https?:|mailto:|tel:)/.test(path)
}

/**
 * @param {string} str
 * @returns {Boolean}
 */
export function validUsername(str) {
  const valid_map = ['admin', 'ztt']
  return valid_map.indexOf(str.trim()) >= 0
}
